package com.jxpowernode.bitcon.douyin;

import com.jxpowernode.bitcon.bean.douyin.FoodVideo;
import com.jxpowernode.bitcon.bean.douyin.GameVideo;
import com.jxpowernode.bitcon.bean.douyin.HotVideo;
import com.jxpowernode.bitcon.service.douyinservice.FoodVideoService;
import com.jxpowernode.bitcon.service.douyinservice.GameVideoService;
import com.jxpowernode.bitcon.service.douyinservice.HotVideoService;

import java.util.List;

/**
 * @Author: Lixuewei
 * @Email:1410511702@qq.com
 * @Desc: 对抖音各种类型视频的分类
 * @Date: 2021/12/7 18:47
 */
public class DouYinController {

    /**
     * 得到热门视频得值并打印在控制台
     * @return 返回得到的热门数据
     */
    public List<HotVideo> getHotVideo() {
        HotVideoService service = new HotVideoService();
        List<HotVideo> hotVideo = service.getHotVideo();
        for (HotVideo list : hotVideo) {
            System.out.println("标题："+list.title);
            System.out.println("作者：" + list.author);
            System.out.println("热度指数："+list.hot_value);
            System.out.println("评论数量：" + list.comment_count);
            System.out.println("播放量："+list.play_count);
            System.out.println("点赞量："+list.digg_count);
            System.out.println("=========================");
        }
        return hotVideo;
    }


    /**
     * 得到食物达人视频得值并打印在控制台
     * @return 返回得到的数据
     */
    public  List<FoodVideo> getFoodVideo() {
        FoodVideoService service = new FoodVideoService();
        List<FoodVideo> foodVideo = service.getFoodVideo();
        for (FoodVideo food : foodVideo) {
            System.out.println("作者："+food.nickname);
            System.out.println("粉丝数："+food.follower_count);
            System.out.println("影响力指数："+food.effect_value);
            System.out.println("=============================");
        }
        return foodVideo;
    }

    /**
     * 得到游戏达人视频得值并打印在控制台
     * @return 返回的到的数据
     */
    public  List<GameVideo> getGameVideo() {
        GameVideoService service = new GameVideoService();
        List<GameVideo> videoList = service.getGameVideo();
        for (GameVideo game : videoList) {
            System.out.println("作者："+game.nickname);
            System.out.println("粉丝数："+game.follower_count);
            System.out.println("影响力指数："+game.effect_value);
            System.out.println("=============================");
        }
        return videoList;
    }

}

